﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace House_Control
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        
        public static House house;
        public static Log log = new Log();
        public static ScheduleContainer sc = new ScheduleContainer();

        [STAThread]
        static void Main()
        {
            intializeHouse(); 
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new HouseControlForm());
            house.armHouse();
        }

        //This method will create the house, add the rooms and add all of the appliances to the rooms.
        private static void intializeHouse()
        {
            house = new House();

            /*
             * This could be dynamically generated, but for ease of implementation (not to mention, how the hell do you program the GUI with a 
             * dynamically generated house?). I say fuck tha police and just hard code the house in. The easiest way to do this is, if we need to do something with a room
             * that we each make our own room and add stuff / manipulate it as nessicary. So for example, every time I (Helwing) use something that deals with rooms I will always
             * use room 0. You guys should pick rooms for yourself and add your room to the following table:
             * 
             * Room Assignments:
             * 0 - Matthew Helwig
             * 1 - AJ Whitney
             */
            
            /*
             * BEGIN HELWIGS ROOM.
             */
            house.addRoom();
            house.getRoom(0).addAppliance(Appliance.TELEVISION);
            house.getRoom(0).addAppliance(Appliance.DISHWASHER);
            house.getRoom(0).addAppliance(Appliance.LIGHT);
            house.getRoom(0).addAppliance(Appliance.PETSTATION);
            house.getRoom(0).addAppliance(Appliance.OVEN);
            house.getRoom(0).addAppliance(Appliance.LIGHT);
            /*
             * END HELWIGS ROOM.
             */
            

            /*
             * BEGIN AJS ROOM
             */
            house.addRoom();
            house.addAlarm(Alarm.DOOR, 1);
            house.addAlarm(Alarm.DOOR, 1);
            house.addAlarm(Alarm.WINDOW, 1);
            house.addAlarm(Alarm.WINDOW, 1);
            house.addAlarm(Alarm.MOTION, 1);
            house.addAlarm(Alarm.MOTION, 1);
            house.addAlarm(Alarm.SMOKE, 1);
            house.addAlarm(Alarm.SMOKE, 1);
            house.addAlarm(Alarm.FIRE, 1);
            house.addAlarm(Alarm.FIRE, 1);
            house.survelliance.addCamera(1);
            house.survelliance.addCamera(1);
            house.survelliance.addCamera(1);

            /*
             * END AJS ROOM
             */

            /*
             * BEGIN JASONS ROOM
             */
            house.addRoom();
            house.getRoom(2).addPool();
            house.getRoom(2).addTub();
            house.getRoom(2).addWindow();

            /*
             * END JASONS ROOM
             */

            //Arm the house
            house.armHouse();
        }
    }
}
